<style lang="scss">
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
}

input[type='number'] {
  -moz-appearance: textfield;
}

.like {
  cursor: pointer;
  font-size: 25px;
  display: inline-block;
}
</style>
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">

      <el-date-picker
        v-model="value2"
        type="daterange"
        value-format="yyyy-MM-dd"
        align="right"
        unlink-panels
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        :picker-options="pickerOptions">
      </el-date-picker> &nbsp;
      <el-form-item prop="all">
        <el-input
          v-model="queryParams.all"
          placeholder="支持姓名/工号查询"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-tabs v-model="activeName" @tab-click="handleClicks" type="card">
      <el-tab-pane label="" name="first">
        <div slot="label">参保人数 ({{ total }})人</div>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['system:scheme:export']"
            >导出
            </el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="schemeList" @selection-change="handleSelectionChange">
          <el-table-column width="120" label="姓名" align="center" prop="name"/>
          <el-table-column width="100" label="工号" align="center" prop="jobNo"/>
          <el-table-column width="100" label="部门" align="center" prop="dname"/>
          <el-table-column width="100" label="职务" align="center" prop="post"/>
          
          <el-table-column width="100" label="工作性质" align="center" prop="workNature"/>
          <el-table-column width="100" label="证件类型" align="center" prop="documentType"/>
          <el-table-column :show-overflow-tooltip="true" label="证件号码" align="center" prop="identificationNumber"/>
          <el-table-column width="120" label="个人社保基数" align="center" prop="grYlBase"/>
          <el-table-column width="120" label="企业社保基数" align="center" prop="companyYlBase"/>
          <el-table-column width="120" label="个人公积金基数" align="center" prop="grFundBase"/>
          <el-table-column width="120" label="企业公积金基数" align="center" prop="companyFundBase"/>
          <el-table-column :show-overflow-tooltip="true" width="120" label="参保城市" align="center" prop="schemeCity"/>
          <el-table-column :show-overflow-tooltip="true" width="120" label="缴纳平台" align="center" prop="schemePlatform"/>
          <el-table-column :show-overflow-tooltip="true" width="120" label="参保方案" align="center" prop="schemeName"/>
          <el-table-column width="120" label="创建日期" align="center" prop="createTime">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
            </template>
          </el-table-column>


          <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width" fixed="right">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['system:scheme:edit']"
              >详情
              </el-button>

              <el-button
                size="mini"
                type="text"
                v-hasPermi="['system:Management:rzsx']"
                @click="dialog(scope.row.id)"
              >停保
              </el-button>


            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-tab-pane>
      <el-tab-pane label="待增员" name="second">
        <div slot="label">待增员 ({{ total1 }})人</div>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['system:scheme:export']"
            >导出
            </el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="zengyuanList" @selection-change="handleSelectionChange">
          <el-table-column label="姓名" align="center" prop="name"/>
          <el-table-column label="工号" align="center" prop="jobNo"/>
          <el-table-column label="部门" align="center" prop="dname"/>
          <el-table-column label="职务" align="center" prop="post"/>
          <!--<el-table-column label="公司" align="center" prop="enterprise"/>-->
          <el-table-column label="工作性质" align="center" prop="workNature"/>
          <el-table-column label="证件类型" align="center" prop="documentType"/>
          <el-table-column label="证件号码" align="center" prop="identificationNumber"/>
          <el-table-column label="员工状态" align="center" prop="identificationNumber">
            <template slot-scope="scope">
              <span v-if="scope.row.status == 3">试用</span>
              <span v-if="scope.row.status == 4">正式</span>
              <span v-if="scope.row.status == 6">离职</span>
            </template>
          </el-table-column>
          <el-table-column label="入职日期" align="center" prop="identificationNumber">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.employmentDate, '{y}-{m}-{d}') }}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width" fixed="right">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"

                @click="handleDen(scope.row.id)"
                v-hasPermi="['system:Management:edit']"
              >办理参保
              </el-button>


            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total1>0"
          :total="total1"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-tab-pane>
      <el-tab-pane label="待停保" name="third">
        <div slot="label">待停保 ({{ total2 }})人</div>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['system:scheme:export']"
            >导出
            </el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="tingbaoList" @selection-change="handleSelectionChange">
          <el-table-column label="姓名" align="center" prop="name"/>
          <el-table-column label="工号" align="center" prop="jobNo"/>
          <el-table-column label="部门" align="center" prop="dname"/>
          <el-table-column label="职务" align="center" prop="post"/>
         <!-- <el-table-column label="公司" align="center" prop="enterprise"/>-->
          <el-table-column label="工作性质" align="center" prop="workNature"/>
          <el-table-column label="证件类型" align="center" prop="documentType"/>
          <el-table-column label="证件号码" align="center" prop="identificationNumber"/>
          <el-table-column label="员工状态" align="center" prop="identificationNumber">
            <template slot-scope="scope">
              <span v-if="scope.row.status == 6">离职</span>

            </template>
          </el-table-column>
          <el-table-column label="离职日期" align="center" prop="quitTime">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.quitTime, '{y}-{m}-{d}') }}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width" fixed="right">
            <template slot-scope="scope">

              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['system:scheme:edit']"
              >详情
              </el-button>

              <el-button
                size="mini"
                type="text"
                v-hasPermi="['system:Management:rzsx']"
                @click="dialog(scope.row.id)"
              >停保
              </el-button>


            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total2>0"
          :total="total2"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-tab-pane>
      <el-tab-pane label="已停保" name="fourth">
        <div slot="label">已停保 ({{ total3 }})人</div>
        <!--        <el-row :gutter="10" class="mb8">
                  <el-col :span="1.5">
                    <el-button
                      type="warning"
                      plain
                      icon="el-icon-download"
                      size="mini"
                      @click="handleExport"
                      v-hasPermi="['system:scheme:export']"
                    >导出
                    </el-button>
                  </el-col>
                  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
                </el-row>-->
        <el-table v-loading="loading" :data="yTbLists" @selection-change="handleSelectionChange">
          <el-table-column label="姓名" align="center" prop="name"/>
          <el-table-column label="工号" align="center" prop="jobNo"/>
          <el-table-column label="部门" align="center" prop="dname"/>
          <el-table-column label="职务" align="center" prop="post"/>
          <!--<el-table-column label="公司" align="center" prop="enterprise"/>-->
          <el-table-column label="工作性质" align="center" prop="workNature"/>
          <el-table-column label="证件类型" align="center" prop="documentType"/>
          <el-table-column label="证件号码" align="center" prop="identificationNumber"/>
          <el-table-column label="员工状态" align="center" prop="identificationNumber">
            <template slot-scope="scope">
              <span v-if="scope.row.status == 6">离职</span>

            </template>
          </el-table-column>
          <el-table-column label="离职日期" align="center" prop="quitTime">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.quitTime, '{y}-{m}-{d}') }}</span>
            </template>
          </el-table-column>
          <el-table-column label="停保日期" align="center" prop="tbTime">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.tbTime, '{y}-{m}-{d}') }}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width" fixed="right">
            <template slot-scope="scope">

              <el-button
                size="mini"
                type="text"
                v-hasPermi="['system:Management:rzsx']"
                @click="deleteById(scope.row.id)"
              >删除
              </el-button>


            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total3>0"
          :total="total3"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="yTbList"
        />
      </el-tab-pane>

      <!--      <el-tab-pane label="已停保" name="thirds">
              <div slot="label">已停保 ({{ total3 }})人</div>
              <el-row :gutter="10" class="mb8">
                <el-col :span="1.5">
                  <el-button
                    type="warning"
                    plain
                    icon="el-icon-download"
                    size="mini"
                    @click="handleExport"
                    v-hasPermi="['system:scheme:export']"
                  >导出
                  </el-button>
                </el-col>
                <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
              </el-row>
              <el-table v-loading="loading" :data="yTbLists" @selection-change="handleSelectionChange">
                <el-table-column label="姓名" align="center" prop="name"/>
                <el-table-column label="工号" align="center" prop="jobNo"/>
                <el-table-column label="部门" align="center" prop="dname"/>
                <el-table-column label="职务" align="center" prop="post"/>
                <el-table-column label="公司" align="center" prop="enterprise"/>
                <el-table-column label="工作性质" align="center" prop="workNature"/>
                <el-table-column label="证件类型" align="center" prop="documentType"/>
                <el-table-column label="证件号码" align="center" prop="identificationNumber"/>
                <el-table-column label="员工状态" align="center" prop="identificationNumber">
                  <template slot-scope="scope">
                    <span v-if="scope.row.status == 6">离职</span>

                  </template>
                </el-table-column>
                <el-table-column label="离职日期" align="center" prop="quitTime">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.quitTime, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width" fixed="right">
                  <template slot-scope="scope">

                    <el-button
                      size="mini"
                      type="text"
                      v-hasPermi="['system:Management:rzsx']"
                      @click="dialog(scope.row.id)"
                    >删除
                    </el-button>


                  </template>
                </el-table-column>
              </el-table>

              <pagination
                v-show="total3>0"
                :total="total3"
                :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize"
                @pagination="getList"
              />
            </el-tab-pane>-->

    </el-tabs>
    <!-- 详情对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="90%" :close-on-click-modal='false' append-to-body
               border>

      <el-form ref="form" :model="form" label-width="80px">
        <h1>员工信息</h1>
        <el-divider></el-divider>
        <el-descriptions column="2" title="">
          <el-divider></el-divider>
          <!--                    <el-descriptions-item label="ID">{{ employeefiles.id }}</el-descriptions-item>-->
          <el-descriptions-item label="姓名">{{ form.name }}</el-descriptions-item>

          <el-descriptions-item label="员工状态" v-if="form.status == 3">试用</el-descriptions-item>
          <el-descriptions-item label="员工状态" v-if="form.status == 4">正式</el-descriptions-item>
          <el-descriptions-item label="工号">{{ form.jobNo }}</el-descriptions-item>
          <el-descriptions-item label="入职日期">{{ form.employmentDate }}</el-descriptions-item>
          <el-descriptions-item label="证件类型">{{ form.documentType }}</el-descriptions-item>
          <el-descriptions-item label="证件号码">{{ form.identificationNumber }}</el-descriptions-item>
          <el-descriptions-item label="个人社保号">{{ form.sbNumber }}</el-descriptions-item>
          <el-descriptions-item label="个人公积金号">{{ form.gjNumber }}</el-descriptions-item>
        </el-descriptions>
        <h1>参保信息</h1>
        <el-divider></el-divider>
        <el-descriptions column="2" title="">
          <el-divider></el-divider>
          <!--                    <el-descriptions-item label="ID">{{ employeefiles.id }}</el-descriptions-item>-->
          <el-descriptions-item label="方案名称">{{ form.schemeName }}</el-descriptions-item>
          <el-descriptions-item label="参保平台">{{ form.schemePlatform }}</el-descriptions-item>
          <el-descriptions-item label="参保城市">{{ form.schemeCity }}</el-descriptions-item>

        </el-descriptions>
        <h1>社保</h1>
        <el-divider></el-divider>
        <table border="1" cellspacing="1" cellpadding="0" bordercolor="#87cefa">
          <tr bgcolor="#87cefa">
            <td colspan="4" height="40" align="center">个人缴纳</td>
            <td colspan="4" height="40" align="center">企业缴纳</td>
          </tr>
          <tr bgcolor="#87cefa">
            <td width="11%" height="40" align="center">缴费项目</td>
            <td width="11%" height="40" align="center">基数</td>
            <td width="11%" height="40" align="center">缴费比例</td>
            <td width="11%" height="40" align="center">金额</td>
            <td width="11%" height="40" align="center">基数</td>
            <td width="11%" height="40" align="center">缴费比例</td>
            <td width="11%" height="40" align="center">金额</td>
            <td width="11%" height="40" align="center">小计</td>
          </tr>
          <tr>
            <td align="center">养老保险</td>
            <td>
              <el-input :disabled="true" v-model="form.grYlBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grYlProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grYlMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyYlBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyYlProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyYlMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.ylInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">工商保险</td>
            <td>
              <el-input :disabled="true" v-model="form.grGsBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grGsProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grGsMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyGsBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyGsProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyGsMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.gsInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">失业保险</td>
            <td>
              <el-input :disabled="true" v-model="form.grSyBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grSyProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grSyMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companySyBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companySyProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companySyMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.syInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">生育保险</td>
            <td>
              <el-input :disabled="true" v-model="form.grBirthBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grBirthProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grBirthMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyBirthBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyBirthProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyBirthMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.birthInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">医疗保险</td>
            <td>
              <el-input :disabled="true" v-model="form.grCareBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grCareProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grCareMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyCareBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyCareProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyCareMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.careInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td></td>
            <td align="center" colspan="3">个人缴纳：<input :disabled="true" v-model="form.grInsuranceMoney"
                                                       placeholder="00.00"/></td>
            <td align="center" colspan="3">公司缴纳：<input :disabled="true" v-model="form.companyInsuranceMoney"
                                                       placeholder="00.00"/></td>
            <td>合计：<input :disabled="true" v-model="form.insuranceMoney" placeholder="00.00"/></td>
          </tr>
        </table>
        <h1>公积金</h1>
        <el-divider></el-divider>
        <table border="1" cellspacing="1" cellpadding="0" bordercolor="#87cefa">
          <tr bgcolor="#87cefa">
            <td colspan="4" height="40" align="center">个人缴纳</td>
            <td colspan="4" height="40" align="center">企业缴纳</td>
          </tr>
          <tr bgcolor="#87cefa">
            <td height="40" width="11%" align="center">缴费项目</td>
            <td height="40" width="11%" align="center">基数</td>
            <td height="40" width="11%" align="center">缴费比例</td>
            <td height="40" width="11%" align="center">金额</td>
            <td height="40" width="11%" align="center">基数</td>
            <td height="40" width="11%" align="center">缴费比例</td>
            <td height="40" width="11%" align="center">金额</td>
            <td height="40" width="11%" align="center">小计</td>
          </tr>
          <tr>
            <td align="center">公积金</td>
            <td>
              <el-input :disabled="true" v-model="form.grFundBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grFundProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.grFundMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyFundBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyFundProportion" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.companyFundMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input :disabled="true" v-model="form.fundSubtotal" placeholder="00.00"/>
            </td>
          </tr>

          <tr>
            <td></td>
            <td align="center" colspan="3">个人缴纳：<input :disabled="true" v-model="form.grFundPayment"
                                                       placeholder="00.00"/></td>
            <td align="center" colspan="3">公司缴纳：<input :disabled="true" v-model="form.companyFundPayment"
                                                       placeholder="00.00"/></td>
            <td>合计：<input :disabled="true" v-model="form.fundTotal" placeholder="00.00"/></td>
          </tr>
        </table>
      </el-form>
    </el-dialog>

    <!-- 办理参保对话框 -->
    <el-dialog :title="title" :visible.sync="cbopen" width="90%" :close-on-click-modal='false' append-to-body
               border>

      <el-form ref="form" :model="form" label-width="80px">
        <h1>员工信息</h1>
        <el-button type="primary" @click="zz=false">编辑</el-button>
        <el-divider></el-divider>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="姓名:" prop="name">
              <el-input :disabled="true" v-model="form.name" placeholder="请输入"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="员工状态:" prop="status">
              <el-input :disabled="true" v-model="status"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="工号:" prop="jobNo">
              <el-input :disabled="true" v-model="form.jobNo" placeholder="请输入"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="入职日期:" prop="employmentDate">
              <el-input :disabled="true" v-model="form.employmentDate" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="证件类型:" prop="documentType">
              <el-input :disabled="true" v-model="form.documentType" placeholder="请输入"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="证件号码:" prop="identificationNumber">
              <el-input :disabled="true" v-model="form.identificationNumber" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="个人社保号:" prop="sbNumber">
              <el-input :disabled="zz" v-model="form.sbNumber" placeholder="请输入"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="个人公积金号:" prop="gjNumber">
              <el-input :disabled="zz" v-model="form.gjNumber" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-form ref="form" :model="form1" :rules="rule" label-width="80px">
        <h1>社保公积金</h1>

        <el-divider></el-divider>

        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="参保方案" prop="schemeName">
              <el-select v-model="form1.schemeName" @change="fan(form1.schemeName)" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.sid"
                  :label="item.schemeName"


                  :value="item.sid">
                </el-option>

              </el-select>
              &nbsp;&nbsp;&nbsp;
              <el-button
                type="primary"
                plain
                icon="el-icon-plus"
                size="mini"
                @click="handleAdds"
                v-hasPermi="['system:scheme:add']"
              >新增方案
              </el-button>
            </el-form-item>

          </el-col>
          <el-col :span="12">
            <el-form-item label="参保月份" prop="insuredTime">
              <el-date-picker clearable

                              style="width: 100%"
                              v-model="form1.insuredTime"
                              type="date"
                              value-format="yyyy-MM-dd HH:mm:ss"
                              placeholder="请选择">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="参保城市" prop="schemeCity">
              <el-cascader
                size="large"
                :options="optionss"
                v-model="selectedAddressOptions"
                @change="handleChange">
              </el-cascader>
            </el-form-item>

          </el-col>
          <el-col :span="12">
            <el-form-item label="缴纳平台" prop="gjNumber">
              <el-input v-model="form1.schemePlatform" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <!--        <el-descriptions column="2" title="" >
                  <el-divider></el-divider>
                  &lt;!&ndash;                    <el-descriptions-item label="ID">{{ employeefiles.id }}</el-descriptions-item>&ndash;&gt;
                  <el-descriptions-item label="方案名称">{{form.schemeName}}</el-descriptions-item>
                  <el-descriptions-item label="参保平台">{{form.schemePlatform}}</el-descriptions-item>
                  <el-descriptions-item label="参保城市">{{form.schemeCity}}</el-descriptions-item>

                </el-descriptions>-->
        <h1>社保</h1>
        <el-divider></el-divider>
        <!--        <el-button type="primary" @click="zs=false">编辑</el-button>-->
        <!--        <el-checkbox v-model="checked" @change="bianji" >编辑</el-checkbox>-->
        <el-radio v-model="radio" @change="radio1" label="1">编辑</el-radio>
        <el-radio v-model="radio" @change="radio2" label="2">恢复默认</el-radio>
        <table border="1" cellspacing="1" cellpadding="0" bordercolor="#87cefa">
          <tr bgcolor="#87cefa">
            <td colspan="4" height="40" align="center">个人缴纳</td>
            <td colspan="4" height="40" align="center">企业缴纳</td>
          </tr>
          <tr bgcolor="#87cefa">
            <td width="11%" height="40" align="center">缴费项目</td>
            <td width="11%" height="40" align="center">基数</td>
            <td width="11%" height="40" align="center">缴费比例</td>
            <td width="11%" height="40" align="center">金额</td>
            <td width="11%" height="40" align="center">基数</td>
            <td width="11%" height="40" align="center">缴费比例</td>
            <td width="11%" height="40" align="center">金额</td>
            <td width="11%" height="40" align="center">小计</td>
          </tr>
          <tr>
            <td align="center">养老保险</td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grYlBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grYlProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.grYlMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyYlBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyYlProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.companyYlMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.ylInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">工商保险</td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grGsBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grGsProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.grGsMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyGsBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyGsProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.companyGsMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.gsInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">失业保险</td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grSyBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grSyProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.grSyMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companySyBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companySyProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.companySyMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.syInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">生育保险</td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grBirthBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grBirthProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.grBirthMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyBirthBase"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyBirthProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.companyBirthMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.birthInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">医疗保险</td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grCareBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.grCareProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.grCareMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyCareBase"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zs" @blur="blurs()" v-model="form1.companyCareProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.companyCareMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.careInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td></td>
            <td align="center" colspan="3">个人缴纳：<input :disabled="true" v-model="form1.grInsuranceMoney"
                                                       placeholder="00.00"/></td>
            <td align="center" colspan="3">公司缴纳：<input :disabled="true" v-model="form1.companyInsuranceMoney"
                                                       placeholder="00.00"/></td>
            <td>合计：<input :disabled="true" v-model="form1.insuranceMoney" placeholder="00.00"/></td>
          </tr>
        </table>
        <h1>公积金</h1>
        <el-checkbox v-model="checkedes" @change="nojj">不缴纳公积金</el-checkbox>
        <el-divider></el-divider>
        <table border="1" cellspacing="1" cellpadding="0" bordercolor="#87cefa">
          <tr bgcolor="#87cefa">
            <td colspan="4" height="40" align="center">个人缴纳</td>
            <td colspan="4" height="40" align="center">企业缴纳</td>
          </tr>
          <tr bgcolor="#87cefa">
            <td height="40" width="11%" align="center">缴费项目</td>
            <td height="40" width="11%" align="center">基数</td>
            <td height="40" width="11%" align="center">缴费比例</td>
            <td height="40" width="11%" align="center">金额</td>
            <td height="40" width="11%" align="center">基数</td>
            <td height="40" width="11%" align="center">缴费比例</td>
            <td height="40" width="11%" align="center">金额</td>
            <td height="40" width="11%" align="center">小计</td>
          </tr>
          <tr>
            <td align="center">公积金</td>
            <td>
              <el-input type="number" :disabled="zx" @blur="blurs()" v-model="form1.grFundBase" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zx" @blur="blurs()" v-model="form1.grFundProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.grFundMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zx" @blur="blurs()" v-model="form1.companyFundBase"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="zx" @blur="blurs()" v-model="form1.companyFundProportion"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.companyFundMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="form1.fundSubtotal" placeholder="00.00"/>
            </td>
          </tr>

          <tr>
            <td></td>
            <td align="center" colspan="3">个人缴纳：<input :disabled="true" v-model="form1.grFundPayment"
                                                       placeholder="00.00"/></td>
            <td align="center" colspan="3">公司缴纳：<input :disabled="true" v-model="form1.companyFundPayment"
                                                       placeholder="00.00"/></td>
            <td>合计：<input :disabled="true" v-model="form1.fundTotal" placeholder="00.00"/></td>
          </tr>
        </table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cbopen=false">取 消</el-button>
      </div>
    </el-dialog>


    <!--放弃入职弹出框 -->
    <el-dialog
      title="办理停保"
      :visible.sync="dialogVisible"
      width="50%"
    >
      <el-form ref="form" :model="orm" :rules="tingbao" label-width="80px">
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="停保日期" prop="tbTime">
              <el-date-picker clearable

                              style="width: 100%"
                              v-model="orm.tbTime"
                              type="date"
                              value-format="yyyy-MM-dd HH:mm:ss"
                              placeholder="请选择">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="备注" prop="tbRemarks">
              <el-input
                type="textarea"
                :rows="2"
                placeholder="请输入"
                v-model="orm.tbRemarks">
              </el-input>
              <!--              <el-input v-model="orm.tbRemarks"  placeholder="请输入" ></el-input>-->
            </el-form-item>
          </el-col>
        </el-row>
        <!--        <el-row :gutter="24">
                  <el-col :span="12">
                    <el-form-item label="备注" prop="tbRemarks">
                      <el-input
                        type="textarea"
                        :rows="2"
                        placeholder="请输入"
                        v-model="orm.tbRemarks">
                      </el-input>
        &lt;!&ndash;              <el-input v-model="orm.tbRemarks"  placeholder="请输入" ></el-input>&ndash;&gt;
                    </el-form-item>
                  </el-col>
                </el-row>-->
      </el-form>
      <!--      <div class="block">
              <span class="demonstration">停保日期：</span>
              <el-date-picker
                v-model="tbTime"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期">
              </el-date-picker>

            </div>
            <span class="demonstration">备注：</span>
            <el-input
              type="textarea"
              :rows="2"
              placeholder="请输入内容"
              v-model="tbRemarks">
            </el-input>-->

      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="Update()">确 定</el-button>

    </el-dialog>


    <el-dialog
      title="添加模板"
      :visible.sync="addmodel"
      width="30%"
    >

      <el-row :gutter="24">
        <el-col :span="12">


          方案名称:
          <el-input v-model="schemeName" placeholder="请输入"></el-input>

        </el-col>
      </el-row>
      <el-button @click="addmodel = false">取 消</el-button>
      <el-button type="primary" @click="addmodels()">确 定</el-button>

    </el-dialog>


    <!-- 添加或修改【请填写功能名称】对话框 -->
    <el-dialog :title="title" :visible.sync="addopen" width="90%" :close-on-click-modal='false' append-to-body
               border>

      <el-form ref="form" :model="addform" :rules="rules" label-width="80px">
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="方案名称" prop="schemeName">
              <el-input v-model="addform.schemeName" placeholder="请输入方案名称"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="参保平台" prop="schemePlatform">
              <el-input v-model="addform.schemePlatform" placeholder="请输入参保平台"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="参保城市" prop="schemeCity">
              <el-cascader
                size="large"
                :options="optionss"
                v-model="city"
                @change="handleChanges">
              </el-cascader>
              <!--              <el-input  v-model="form.schemeCity" placeholder="请输入参保城市"/>-->
            </el-form-item>
          </el-col>
        </el-row>
        <h1>社保</h1>
        <el-divider></el-divider>
        <table border="1" cellspacing="1" cellpadding="0" bordercolor="#87cefa">
          <tr bgcolor="#87cefa">
            <td colspan="4" height="40" align="center">个人缴纳</td>
            <td colspan="4" height="40" align="center">企业缴纳</td>
          </tr>
          <tr bgcolor="#87cefa">
            <td width="11%" height="40" align="center">缴费项目</td>
            <td width="11%" height="40" align="center">基数</td>
            <td width="11%" height="40" align="center">缴费比例</td>
            <td width="11%" height="40" align="center">金额</td>
            <td width="11%" height="40" align="center">基数</td>
            <td width="11%" height="40" align="center">缴费比例</td>
            <td width="11%" height="40" align="center">金额</td>
            <td width="11%" height="40" align="center">小计</td>
          </tr>
          <tr>
            <td align="center">养老保险</td>
            <td>
              <el-input type="number" v-model="addform.grYlBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.grYlProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.grYlMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyYlBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyYlProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.companyYlMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.ylInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">工商保险</td>
            <td>
              <el-input type="number" v-model="addform.grGsBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.grGsProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.grGsMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyGsBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyGsProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.companyGsMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.gsInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">失业保险</td>
            <td>
              <el-input type="number" v-model="addform.grSyBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.grSyProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.grSyMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companySyBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companySyProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.companySyMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.syInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">生育保险</td>
            <td>
              <el-input type="number" v-model="addform.grBirthBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.grBirthProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.grBirthMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyBirthBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyBirthProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.companyBirthMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.birthInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td align="center">医疗保险</td>
            <td>
              <el-input type="number" v-model="addform.grCareBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.grCareProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.grCareMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyCareBase" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" v-model="addform.companyCareProportion" @blur="blures()" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.companyCareMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.careInsuranceMoney" placeholder="00.00"/>
            </td>
          </tr>
          <tr>
            <td></td>
            <td align="center" colspan="3">个人缴纳：<input :disabled="true" v-model="addform.grInsuranceMoney"
                                                       placeholder="00.00"/></td>
            <td align="center" colspan="3">公司缴纳：<input :disabled="true" v-model="addform.companyInsuranceMoney"
                                                       placeholder="00.00"/></td>
            <td>合计：<input :disabled="true" v-model="addform.insuranceMoney" placeholder="00.00"/></td>
          </tr>
        </table>
        <h1>公积金</h1>
        <el-checkbox v-model="checkedess" @change="nojjs">不缴纳公积金</el-checkbox>
        <el-divider></el-divider>
        <table border="1" cellspacing="1" cellpadding="0" bordercolor="#87cefa">
          <tr bgcolor="#87cefa">
            <td colspan="4" height="40" align="center">个人缴纳</td>
            <td colspan="4" height="40" align="center">企业缴纳</td>
          </tr>
          <tr bgcolor="#87cefa">
            <td height="40" width="11%" align="center">缴费项目</td>
            <td height="40" width="11%" align="center">基数</td>
            <td height="40" width="11%" align="center">缴费比例</td>
            <td height="40" width="11%" align="center">金额</td>
            <td height="40" width="11%" align="center">基数</td>
            <td height="40" width="11%" align="center">缴费比例</td>
            <td height="40" width="11%" align="center">金额</td>
            <td height="40" width="11%" align="center">小计</td>
          </tr>
          <tr>
            <td align="center">公积金</td>
            <td>
              <el-input type="number" :disabled="isjn" v-model="addform.grFundBase" @blur="blures()"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="isjn" v-model="addform.grFundProportion" @blur="blures()"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.grFundMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="isjn" v-model="addform.companyFundBase" @blur="blures()"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="isjn" v-model="addform.companyFundProportion" @blur="blures()"
                        placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.companyFundMoney" placeholder="00.00"/>
            </td>
            <td>
              <el-input type="number" :disabled="true" v-model="addform.fundSubtotal" placeholder="00.00"/>
            </td>
          </tr>

          <tr>
            <td></td>
            <td align="center" colspan="3">个人缴纳：<input :disabled="true" v-model="addform.grFundPayment"
                                                       placeholder="00.00"/></td>
            <td align="center" colspan="3">公司缴纳：<input :disabled="true" v-model="addform.companyFundPayment"
                                                       placeholder="00.00"/></td>
            <td>合计：<input :disabled="true" v-model="addform.fundTotal" placeholder="00.00"/></td>
          </tr>
        </table>


      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForms">确 定</el-button>
        <el-button @click="addopen == false">取 消</el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
import {listSchemes, getScheme, addScheme, add} from "@/api/system/scheme";
import {getEmployeefiles, listEmployeefiles, updateEmployeefiles, listAdd} from '@/api/system/employeefiles'
import {CodeToText, regionData, TextToCode} from 'element-china-area-data'


export default {
  name: "Scheme",
  data() {
    return {

      checkedes: false,
      checkedess: false,
      zx: true,
      isjn: false,
      checked: false,
      schemeName: null,
      addmodel: false,
      sid: null,
      status: null,
      insuredTime: null,
      zz: true,
      zs: true,
      form1: {
        grYlBase: 0.00,
        grGsBase: 0.00,
        grSyBase: 0.00,
        grBirthBase: 0.00,
        grCareBase: 0.00,
        grYlProportion: 0.00,
        grGsProportion: 0.00,
        grSyProportion: 0.00,
        grBirthProportion: 0.00,
        grCareProportion: 0.00,
        grYlMoney: 0.00,
        grGsMoney: 0.00,
        grSyMoney: 0.00,
        grBirthMoney: 0.00,
        grCareMoney: 0.00,
        companyYlBase: 0.00,
        companyGsBase: 0.00,
        companySyBase: 0.00,
        companyBirthBase: 0.00,
        companyCareBase: 0.00,
        companyYlProportion: 0.00,
        companyGsProportion: 0.00,
        companySyProportion: 0.00,
        companyBirthProportion: 0.00,
        companyCareProportion: 0.00,
        companyYlMoney: 0.00,
        companyGsMoney: 0.00,
        companySyMoney: 0.00,
        companyBirthMoney: 0.00,
        companyCareMoney: 0.00,
        grInsuranceMoney: 0.00,
        companyInsuranceMoney: 0.00,
        insuranceMoney: 0.00,
        ylInsuranceMoney: 0.00,
        gsInsuranceMoney: 0.00,
        syInsuranceMoney: 0.00,
        birthInsuranceMoney: 0.00,
        careInsuranceMoney: 0.00,
        grFundBase: 0.00,
        grFundProportion: 0.00,
        grFundMoney: 0.00,
        companyFundBase: 0.00,
        companyFundProportion: 0.00,
        companyFundMoney: 0.00,
        fundSubtotal: 0.00,
        fundTotal: 0.00,
        grFundPayment: 0.00,
        companyFundPayment: 0.00,
      },
      //省市区
      cbopen: false,
      tbTime: null,
      tbRemarks: null,
      optionss: regionData,
      options: [],
      selectedAddressOptions: [],
      city: [],
      activeName: 'first',
      like: true,
      value1: 4154.564,
      value2: "",
      dialogVisible: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      total1: 0,
      total2: 0,
      total3: 0,
      // 【请填写功能名称】表格数据
      schemeList: [],
      zengyuanList: [],
      tingbaoList: [],
      num: {},
      backups: {},
      radio: '2',
      addform: {
        grYlBase: 0.00,
        grGsBase: 0.00,
        grSyBase: 0.00,
        grBirthBase: 0.00,
        grCareBase: 0.00,
        grYlProportion: 0.00,
        grGsProportion: 0.00,
        grSyProportion: 0.00,
        grBirthProportion: 0.00,
        grCareProportion: 0.00,
        grYlMoney: 0.00,
        grGsMoney: 0.00,
        grSyMoney: 0.00,
        grBirthMoney: 0.00,
        grCareMoney: 0.00,
        companyYlBase: 0.00,
        companyGsBase: 0.00,
        companySyBase: 0.00,
        companyBirthBase: 0.00,
        companyCareBase: 0.00,
        companyYlProportion: 0.00,
        companyGsProportion: 0.00,
        companySyProportion: 0.00,
        companyBirthProportion: 0.00,
        companyCareProportion: 0.00,
        companyYlMoney: 0.00,
        companyGsMoney: 0.00,
        companySyMoney: 0.00,
        companyBirthMoney: 0.00,
        companyCareMoney: 0.00,
        grInsuranceMoney: 0.00,
        companyInsuranceMoney: 0.00,
        insuranceMoney: 0.00,
        ylInsuranceMoney: 0.00,
        gsInsuranceMoney: 0.00,
        syInsuranceMoney: 0.00,
        birthInsuranceMoney: 0.00,
        careInsuranceMoney: 0.00,
        grFundBase: 0.00,
        grFundProportion: 0.00,
        grFundMoney: 0.00,
        companyFundBase: 0.00,
        companyFundProportion: 0.00,
        companyFundMoney: 0.00,
        fundSubtotal: 0.00,
        fundTotal: 0.00,
        grFundPayment: 0.00,
        companyFundPayment: 0.00,
      },
      addopen: false,

      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      orm: {},
      query: {
        pageNum: null,
        pageSize: null,
        schemeName: null,
        schemePlatform: null,
        schemeCity: null,
        grYlBase: null,
        grGsBase: null,
        grSyBase: null,
        grBirthBase: null,
        grCareBase: null,
        grYlProportion: null,
        grGsProportion: null,
        grSyProportion: null,
        grBirthProportion: null,
        grCareProportion: null,
        grYlMoney: null,
        grGsMoney: null,
        grSyMoney: null,
        grBirthMoney: null,
        grCareMoney: null,
        companyYlBase: null,
        companyGsBase: null,
        companySyBase: null,
        companyBirthBase: null,
        companyCareBase: null,
        companyYlProportion: null,
        companyGsProportion: null,
        companySyProportion: null,
        companyBirthProportion: null,
        companyCareProportion: null,
        companyYlMoney: null,
        companyGsMoney: null,
        companySyMoney: null,
        companyBirthMoney: null,
        companyCareMoney: null,
        grInsuranceMoney: null,
        companyInsuranceMoney: null,
        insuranceMoney: null,
        ylInsuranceMoney: null,
        gsInsuranceMoney: null,
        syInsuranceMoney: null,
        birthInsuranceMoney: null,
        careInsuranceMoney: null,
        grFundBase: null,
        grFundProportion: null,
        grFundMoney: null,
        companyFundBase: null,
        companyFundProportion: null,
        companyFundMoney: null,
        fundSubtotal: null,
        fundTotal: null,
        grFundPayment: null,
        companyFundPayment: null,
        isFund: null,
        isDelete: null
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        all: null,
        socialSecuritySalary: null,
        status: null,
      },
      // 表单参数
      form: {},
      yTbLists: [],
      title3: "",
      id: null,
      serch: 0,
      // 表单校验
      rules: {
        schemeName: [
          {required: true, message: '方案名称不能为空', trigger: 'blur'}
        ],
        schemeCity: [
          {required: true, message: '参保城市不能为空', trigger: 'blur'}
        ],
      },

      rule: {
        schemeName: [
          {required: true, message: '参保方案不能为空', trigger: 'blur'}
        ],
        insuredTime: [
          {required: true, message: '参保时间不能为空', trigger: 'blur'}
        ],
        schemeCity: [
          {required: true, message: '参保城市不能为空', trigger: 'blur'}
        ],
      },

      tingbao: {
        tbTime: [
          {required: true, message: '停保日期不能为空', trigger: 'blur'}
        ],

      }


    };
  },
  created() {
    this.getList();
    this.getzengyuanList();
    this.gettingbaoList();
    this.yTbList();

  },
  methods: {
    pickerOptions: {
      shortcuts: [{
        text: '最近一周',
        onClick(picker) {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
          picker.$emit('pick', [start, end]);
        }
      }, {
        text: '最近一个月',
        onClick(picker) {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
          picker.$emit('pick', [start, end]);
        }
      }, {
        text: '最近三个月',
        onClick(picker) {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
          picker.$emit('pick', [start, end]);
        }
      }]
    },


    /**参保按钮 **/
    handleDen(id) {
      this.reset();
      this.zz = true;
      this.zs = true;
      this.selectedAddressOptions = null;
      this.id = id
      getEmployeefiles(id).then(response => {

        this.form = response.data;
        if (this.form.status == 3) {
          this.status = '试用'
        } else if (this.form.status == 4) {
          this.status = '正式'
        } else if (this.form.status == 6) {
          this.status = '离职'
        } else if (this.form.status == 0) {
          this.status = '未入职'
        }
        this.cbopen = true;


      });
    },

    /** 新增按钮操作 */
    handleAdds() {
      this.addform = {
        grYlBase: 0,
        grGsBase: 0,
        grSyBase: 0,
        grBirthBase: 0,
        grCareBase: 0,
        grYlProportion: 0,
        grGsProportion: 0,
        grSyProportion: 0,
        grBirthProportion: 0,
        grCareProportion: 0,
        grYlMoney: 0,
        grGsMoney: 0,
        grSyMoney: 0,
        grBirthMoney: 0,
        grCareMoney: 0,
        companyYlBase: 0,
        companyGsBase: 0,
        companySyBase: 0,
        companyBirthBase: 0,
        companyCareBase: 0,
        companyYlProportion: 0,
        companyGsProportion: 0,
        companySyProportion: 0,
        companyBirthProportion: 0,
        companyCareProportion: 0,
        companyYlMoney: 0,
        companyGsMoney: 0,
        companySyMoney: 0,
        companyBirthMoney: 0,
        companyCareMoney: 0,
        grInsuranceMoney: 0,
        companyInsuranceMoney: 0,
        insuranceMoney: 0,
        ylInsuranceMoney: 0,
        gsInsuranceMoney: 0,
        syInsuranceMoney: 0,
        birthInsuranceMoney: 0,
        careInsuranceMoney: 0,
        grFundBase: 0,
        grFundProportion: 0,
        grFundMoney: 0,
        companyFundBase: 0,
        companyFundProportion: 0,
        companyFundMoney: 0,
        fundSubtotal: 0,
        fundTotal: 0,
        grFundPayment: 0,
        companyFundPayment: 0,
      };
      this.selectedAddressOptions = null;

      this.addopen = true;
      this.title = "新增参保方案";
    },
    /** 新增方案操作 */
    addmodels() {
      this.form1.schemeName = this.schemeName
      this.form1.sbNumber = this.form.sbNumber
      this.form1.gjNumber = this.form.gjNumber
      this.form1.id = this.id
      add(this.form1).then(response => {
        this.$modal.msgSuccess("新增成功");
        this.addmodel = false;
        this.cbopen = false;

        this.getList();
        this.getzengyuanList();
        this.gettingbaoList();
        this.yTbList();
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          var sid = this.sid
          getScheme(sid).then(response => {
            if (this.radio == 2) {
              this.orm.id = this.id
              this.orm.sid = this.sid
              this.orm.insuredTime = this.form1.insuredTime
              this.orm.socialSecuritySalary = 1
              this.orm.sbNumber = this.form.sbNumber
              this.orm.gjNumber = this.form.gjNumber

              updateEmployeefiles(this.orm).then(response => {
                this.$modal.msgSuccess("操作成功");
                this.dialogVisible = false;
                this.orm = {}
                this.form1 = {}
                this.getList();
                this.getzengyuanList();
                this.gettingbaoList();
                this.yTbList();
                this.cbopen = false
              });

            } else if (this.radio == 1) {
              this.addmodel = true;

            }
          });
        }
      })

      /*if (JSON.stringify(response.data) == JSON.stringify(this.form1)) {
        this.orm.id = this.id
        this.orm.sid = this.sid
        this.orm.insuredTime = this.insuredTime
        this.orm.socialSecuritySalary = 1
        this.orm.sbNumber = this.form.sbNumber
        this.orm.gjNumber = this.form.gjNumber
        updateEmployeefiles(this.orm).then(response => {
          this.$modal.msgSuccess("操作成功");
          this.dialogVisible = false;
          this.orm = {}
          this.form1 = {}
          this.getList();
          this.getzengyuanList();
          this.gettingbaoList();
          this.cbopen = false
        });
      } else {
        alert("添加")
      }*/


    },

    fan(id) {
      this.sid = id
      this.zs = true;
      getScheme(id).then(response => {
        this.backups = response.data;
        this.form1 = response.data;


        var addressStr = new Array(); //定义一数组
        addressStr = (this.form1.schemeCity).split("/"); //字符分割
        this.selectedAddressOptions = TextToCode[addressStr[0]][addressStr[1]][addressStr[2]].code;


      });


    },

    /**停保按钮 **/
    dialog(id) {
      this.orm.id = id
      this.dialogVisible = true;
    },


    /**编辑按钮 **/
    radio1() {
      this.zs = false
      this.zx = false
    },
    radio2() {
      this.zs = true
      this.zx = true
      var id = this.sid;

      if (id == null) {
        this.form1 = {
          grYlBase: 0.00,
          grGsBase: 0.00,
          grSyBase: 0.00,
          grBirthBase: 0.00,
          grCareBase: 0.00,
          grYlProportion: 0.00,
          grGsProportion: 0.00,
          grSyProportion: 0.00,
          grBirthProportion: 0.00,
          grCareProportion: 0.00,
          grYlMoney: 0.00,
          grGsMoney: 0.00,
          grSyMoney: 0.00,
          grBirthMoney: 0.00,
          grCareMoney: 0.00,
          companyYlBase: 0.00,
          companyGsBase: 0.00,
          companySyBase: 0.00,
          companyBirthBase: 0.00,
          companyCareBase: 0.00,
          companyYlProportion: 0.00,
          companyGsProportion: 0.00,
          companySyProportion: 0.00,
          companyBirthProportion: 0.00,
          companyCareProportion: 0.00,
          companyYlMoney: 0.00,
          companyGsMoney: 0.00,
          companySyMoney: 0.00,
          companyBirthMoney: 0.00,
          companyCareMoney: 0.00,
          grInsuranceMoney: 0.00,
          companyInsuranceMoney: 0.00,
          insuranceMoney: 0.00,
          ylInsuranceMoney: 0.00,
          gsInsuranceMoney: 0.00,
          syInsuranceMoney: 0.00,
          birthInsuranceMoney: 0.00,
          careInsuranceMoney: 0.00,
          grFundBase: 0.00,
          grFundProportion: 0.00,
          grFundMoney: 0.00,
          companyFundBase: 0.00,
          companyFundProportion: 0.00,
          companyFundMoney: 0.00,
          fundSubtotal: 0.00,
          fundTotal: 0.00,
          grFundPayment: 0.00,
          companyFundPayment: 0.00,
        };
      } else {
        getScheme(this.sid).then(response => {
          this.backups = response.data;
          this.form1 = response.data;


          var addressStr = new Array(); //定义一数组
          addressStr = (this.form1.schemeCity).split("/"); //字符分割
          this.selectedAddressOptions = TextToCode[addressStr[0]][addressStr[1]][addressStr[2]].code;


        });
      }


    },


    nojj() {
      if (this.radio == 1) {
        if (this.checkedes) {
          this.zx = true
          this.form1.grFundBase = 0;
          this.form1.grFundProportion = 0;
          this.form1.grFundMoney = 0;
          this.form1.companyFundBase = 0;
          this.form1.companyFundProportion = 0;
          this.form1.companyFundMoney = 0;
          this.form1.fundSubtota = 0;
          this.form1.grFundPayment = 0;
          this.form1.companyFundPayment = 0;
          this.form1.fundTotal = 0;
          this.form1.fundSubtotal = 0;
          this.isjn = true;
        } else if (this.radio == 2) {
          this.zx = false

        }
      }


    },
    nojjs() {
      if (this.checkedess) {
        this.addform.grFundBase = 0;
        this.addform.grFundProportion = 0;
        this.addform.grFundMoney = 0;
        this.addform.companyFundBase = 0;
        this.addform.companyFundProportion = 0;
        this.addform.companyFundMoney = 0;
        this.addform.fundSubtota = 0;
        this.addform.grFundPayment = 0;
        this.addform.companyFundPayment = 0;
        this.addform.fundTotal = 0;
        this.form1.fundSubtotal = 0;
        this.isjn = true;
      } else {
        this.isjn = false;
      }
    },
    /** 停保按钮 */
    Update() {

      this.$refs["form"].validate(valid => {
        if (valid) {
          this.orm.socialSecuritySalary = 3
          updateEmployeefiles(this.orm).then(response => {
            this.$modal.msgSuccess("操作成功");
            this.dialogVisible = false;
            this.tbTime = null;
            this.tbRemarks = null;

            this.orm = {}
            this.getList();
            this.getzengyuanList();
            this.gettingbaoList();
            this.yTbList();
          });

        }
      })


    },


    /** 停保按钮 */
    deleteById(id) {
      this.$modal.confirm('是否确认删除').then(() => {
        this.orm = {};
        this.orm.id = id;
        this.orm.socialSecuritySalary = 4
        updateEmployeefiles(this.orm).then(response => {
          this.$modal.msgSuccess("操作成功");
          this.orm = {}
          this.getList();
          this.getzengyuanList();
          this.gettingbaoList();
          this.yTbList();
        });
      })




    },


    /** 查询【请填写功能名称】列表 */
    getList() {

      this.loading = true;
      this.queryParams.socialSecuritySalary = 1
      listEmployeefiles(this.queryParams).then(response => {
        this.schemeList = response.rows;
        this.total = response.total;
      });
      this.loading = false;

      listSchemes(this.query).then(response => {
        this.options = response.rows;
      });
    },
    /** 待停保列表 */
    gettingbaoList() {
      this.loading = true;
      this.queryParams.socialSecuritySalary = 1;
      this.queryParams.status = 6;
      listEmployeefiles(this.queryParams).then(response => {
        this.tingbaoList = response.rows;
        this.total2 = response.total;
        this.queryParams.status = null
      });
      this.loading = false;
    },
    /** 增员列表 */
    getzengyuanList() {
      this.loading = true;
      this.queryParams.socialSecuritySalary = 0;

      listAdd(this.queryParams).then(response => {
        this.zengyuanList = response.rows;
        this.total1 = response.total;
      });
      this.loading = false;
    },
    /** 增员列表 */
    yTbList() {
      this.loading = true;
      this.queryParams.socialSecuritySalary = 3;
      this.queryParams.status = null;
      listEmployeefiles(this.queryParams).then(response => {
        this.yTbLists = response.rows;
        this.total3 = response.total;
      });
      this.loading = false;
    },

    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        sid: 0,
        schemeName: 0,
        schemePlatform: 0,
        schemeCity: 0,
        grYlBase: 0,
        grGsBase: 0,
        grSyBase: 0,
        grBirthBase: 0,
        grCareBase: 0,
        grYlProportion: 0,
        grGsProportion: 0,
        grSyProportion: 0,
        grBirthProportion: 0,
        grCareProportion: 0,
        grYlMoney: 0,
        grGsMoney: 0,
        grSyMoney: 0,
        grBirthMoney: 0,
        grCareMoney: 0,
        companyYlBase: 0,
        companyGsBase: 0,
        companySyBase: 0,
        companyBirthBase: 0,
        companyCareBase: 0,
        companyYlProportion: 0,
        companyGsProportion: 0,
        companySyProportion: 0,
        companyBirthProportion: 0,
        companyCareProportion: 0,
        companyYlMoney: 0,
        companyGsMoney: 0,
        companySyMoney: 0,
        companyBirthMoney: 0,
        companyCareMoney: 0,
        grInsuranceMoney: 0,
        companyInsuranceMoney: 0,
        insuranceMoney: 0,
        ylInsuranceMoney: 0,
        gsInsuranceMoney: 0,
        syInsuranceMoney: 0,
        birthInsuranceMoney: 0,
        careInsuranceMoney: 0,
        grFundBase: 0,
        grFundProportion: 0,
        grFundMoney: 0,
        companyFundBase: 0,
        companyFundProportion: 0,
        companyFundMoney: 0,
        fundSubtotal: 0,
        fundTotal: 0,
        grFundPayment: 0,
        companyFundPayment: 0,
        isFund: 0,
        isDelete: 0
      };

      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      if (this.value2 != '' && this.value2 != null) {
        this.queryParams.beginTime = this.value2[0];
        this.queryParams.endTime = this.value2[1];
      }
      if (this.value2 == '' || this.value2 == null) {
        this.queryParams.beginTime = null;
        this.queryParams.endTime = null;
      }

      this.queryParams.pageNum = 1;
      if (this.serch == 2) {
        this.gettingbaoList();

      } else if (this.serch == 1) {
        this.getzengyuanList()

      } else if (this.serch == 0) {
        this.getList();

      } else if (this.serch == 3) {
        this.yTbList();
      }

    },
    /** 重置按钮操作 */
    resetQuery() {

      this.queryParams.all = null;
      this.value2 = null;
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.sid)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加【请填写功能名称】";
    },


    /** 修改按钮操作 */
    handleUpdate(row) {

      this.reset();
      var id = row.id
      getEmployeefiles(id).then(response => {

        this.form = response.data;
        var addressStr = new Array(); //定义一数组
        addressStr = (this.form.schemeCity).split("/"); //字符分割
        this.selectedAddressOptions = TextToCode[addressStr[0]][addressStr[1]][addressStr[2]].code;

        this.open = true;
        this.title = "详情";
      });
    },


    /** 导出按钮操作 */
    handleExport() {
      if (this.serch == 0) {
        this.download('system/employeefiles/cbrsexport', {
          ...this.queryParams
        }, `参保人数档案${new Date().getTime()}.xlsx`)
      } else if (this.serch == 1) {
        this.download('system/employeefiles/dcbexport', {
          ...this.queryParams
        }, `待参保人数档案${new Date().getTime()}.xlsx`)
      } else if (this.serch == 2) {
        this.download('system/employeefiles/dtbexport', {
          ...this.queryParams
        }, `待停保人数档案${new Date().getTime()}.xlsx`)
      }

    },
    //省市区
    handleChange(value) {
      //我们选择地址后，selectedAddressOptions 会保存对应的区域码，
      //例如北京的区域码为'110000'
      //我们要取出区域码对应的汉字，就需要用CodeToText(区域码)进行输出
      var schemeCity = ''
      this.selectedAddressOptions.map(item => schemeCity += CodeToText[item] + '/')
      this.form.schemeCity = schemeCity;//更新表单的数据，以便保存更新
      this.addform.city = schemeCity;//更新表单的数据，以便保存更新
    },
    //省市区
    handleChanges(value) {
      //我们选择地址后，selectedAddressOptions 会保存对应的区域码，
      //例如北京的区域码为'110000'
      //我们要取出区域码对应的汉字，就需要用CodeToText(区域码)进行输出
      var schemeCity = ''
      this.city.map(item => schemeCity += CodeToText[item] + '/')
      this.addform.schemeCity = schemeCity;//更新表单的数据，以便保存更新

    },


    blurs() {


      //养老个人金额

      this.form1.grYlMoney = this.mul(this.form1.grYlBase, this.form1.grYlProportion).toFixed(2)
      //养老企业金额

      this.form1.companyYlMoney = this.mul(this.form1.companyYlBase, this.form1.companyYlProportion).toFixed(2)
      //养老小计

      this.form1.ylInsuranceMoney = this.sum(this.form1.grYlMoney, this.form1.companyYlMoney).toFixed(2)

      //工商个人金额
      this.form1.grGsMoney = this.mul(this.form1.grGsBase, this.form1.grGsProportion).toFixed(2)
      //工商企业金额
      this.form1.companyGsMoney = this.mul(this.form1.companyGsBase, this.form1.companyGsProportion).toFixed(2)
      //工商小计

      this.form1.gsInsuranceMoney = this.sum(this.form1.grGsMoney, this.form1.companyGsMoney).toFixed(2)

      //失业个人金额

      this.form1.grSyMoney = this.mul(this.form1.grSyBase, this.form1.grSyProportion).toFixed(2)
      //失业企业金额

      this.form1.companySyMoney = this.mul(this.form1.companySyBase, this.form1.companySyProportion).toFixed(2)

      //失业小计

      this.form1.syInsuranceMoney = this.sum(this.form1.grSyMoney, this.form1.companySyMoney).toFixed(2)

      //生育个人金额

      this.form1.grBirthMoney = this.mul(this.form1.grBirthBase, this.form1.grBirthProportion).toFixed(2)
      //生育企业金额

      this.form1.companyBirthMoney = this.mul(this.form1.companyBirthBase, this.form1.companyBirthProportion).toFixed(2)
      //生育小计

      this.form1.birthInsuranceMoney = this.sum(this.form1.grBirthMoney, this.form1.companyBirthMoney).toFixed(2)

      //医疗个人金额

      this.form1.grCareMoney = this.mul(this.form1.grCareBase, this.form1.grCareProportion).toFixed(2)
      //医疗企业金额

      this.form1.companyCareMoney = this.mul(this.form1.companyCareBase, this.form1.companyCareProportion).toFixed(2)
      //医疗小计
      /*this.form1.careInsuranceMoney = (Number(this.form1.grCareMoney + this.form1.companyCareMoney).toFixed(2))*/
      this.form1.careInsuranceMoney = this.sum(this.form1.grCareMoney, this.form1.companyCareMoney).toFixed(2)

      //社保个人缴纳
      /*this.form1.grInsuranceMoney = (Number(this.form1.grYlMoney + this.form1.grGsMoney + this.form1.grSyMoney + this.form1.grBirthMoney + this.form1.grCareMoney).toFixed(2))*/
      this.form1.grInsuranceMoney = this.sum(this.sum(this.sum(this.form1.grYlMoney, this.form1.grGsMoney), this.sum(this.form1.grSyMoney, this.form1.grBirthMoney)), this.form1.grCareMoney).toFixed(2)

      //社保公司缴纳
      /*this.form1.companyInsuranceMoney = (Number(this.form1.companyYlMoney + this.form1.companyGsMoney + this.form1.companySyMoney + this.form1.companyBirthMoney + this.form1.companyCareMoney).toFixed(2))*/
      this.form1.companyInsuranceMoney = this.sum(this.sum(this.sum(this.form1.companyYlMoney, this.form1.companyGsMoney), this.sum(this.form1.companySyMoney, this.form1.companyBirthMoney)), this.form1.companyCareMoney).toFixed(2)

      //社保合计
      /*this.form1.insuranceMoney = (Number(this.form1.grInsuranceMoney + this.form1.companyInsuranceMoney).toFixed(2))*/
      this.form1.insuranceMoney = this.sum(this.form1.grInsuranceMoney, this.form1.companyInsuranceMoney).toFixed(2)

      //公积金个人金额
      /*this.form1.grFundMoney = (Number(this.form1.grFundBase * this.form1.grFundProportion).toFixed(2))*/
      this.form1.grFundMoney = this.mul(this.form1.grFundBase, this.form1.grFundProportion).toFixed(2)

      //公积金公司金额
      /*this.form1.companyFundMoney = (Number(this.form1.companyFundBase * this.form1.companyFundProportion).toFixed(2))*/
      this.form1.companyFundMoney = this.mul(this.form1.companyFundBase, this.form1.companyFundProportion).toFixed(2)

      //公积金小计
      /*this.form1.fundSubtotal = (Number(this.form1.grFundMoney + this.form1.companyFundMoney).toFixed(2))*/
      this.form1.fundSubtotal = this.sum(this.form1.grFundMoney, this.form1.companyFundMoney).toFixed(2)

      //公积金个人缴纳
      this.form1.grFundPayment = this.form1.grFundMoney

      //公积金公司缴纳
      this.form1.companyFundPayment = this.form1.companyFundMoney

      //公积金合计
      /*this.form1.fundTotal = (Number(this.form1.grFundPayment + this.form1.companyFundPayment).toFixed(2))*/
      this.form1.fundTotal = this.sum(this.form1.grFundPayment, this.form1.companyFundPayment).toFixed(2)

    },

    /**
     ** 加法函数，用来得到精确的加法结果
     ** 说明：javascript 的加法结果会有误差，在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
     ** 调用：sum(arg1,arg2)
     ** 返回值：arg1 加上 arg2 的精确结果
     **/
    sum(arg1, arg2) {

      let r1, r2
      try {
        r1 = arg1.toString().split('.')[1].length
      } catch (e) {
        r1 = 0
      }
      try {
        r2 = arg2.toString().split('.')[1].length
      } catch (e) {
        r2 = 0
      }
      const c = Math.abs(r1 - r2)
      const m = Math.pow(10, Math.max(r1, r2))
      if (c > 0) {
        const cm = Math.pow(10, c)
        if (r1 > r2) {
          arg1 = Number(arg1.toString().replace('.', ''))
          arg2 = Number(arg2.toString().replace('.', '')) * cm
        } else {
          arg1 = Number(arg1.toString().replace('.', '')) * cm
          arg2 = Number(arg2.toString().replace('.', ''))
        }
      } else {
        arg1 = Number(arg1.toString().replace('.', ''))
        arg2 = Number(arg2.toString().replace('.', ''))
      }
      return (arg1 + arg2) / m
    },
    /**
     ** 减法函数，用来得到精确的减法结果
     ** 说明：javascript 的减法结果会有误差，在两个浮点 g2)会比较明显。这个函数返回较为精确的减法结果。
     ** 调用：sub(arg1,arg2)
     ** 返回值：arg1 加上 arg2 的精确结果
     **/
    sub(arg1, arg2) {

      let r1, r2
      try {
        r1 = arg1.toString().split('.')[1].length
      } catch (e) {
        r1 = 0
      }
      try {
        r2 = arg2.toString().split('.')[1].length
      } catch (e) {
        r2 = 0
      }
      const c = Math.abs(r1 - r2)
      const m = Math.pow(10, Math.max(r1, r2))
      if (c > 0) {
        const cm = Math.pow(10, c)
        if (r1 > r2) {
          arg1 = Number(arg1.toString().replace('.', ''))
          arg2 = Number(arg2.toString().replace('.', '')) * cm
        } else {
          arg1 = Number(arg1.toString().replace('.', '')) * cm
          arg2 = Number(arg2.toString().replace('.', ''))
        }
      } else {
        arg1 = Number(arg1.toString().replace('.', ''))
        arg2 = Number(arg2.toString().replace('.', ''))
      }
      return (arg1 - arg2) / m
    },
    /**
     ** 乘法函数，用来得到精确的乘法结果
     ** 说明：javascript 的乘法结果会有误差，在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
     ** 调用：mul(arg1,arg2)
     ** 返回值：arg1 乘以 arg2 的精确结果
     **/
    mul(arg1, arg2) {

      let m = 0
      const s1 = arg1.toString()
      const s2 = arg2.toString()
      try {
        m += s1.split('.')[1].length
      } catch (e) {

      }
      try {
        m += s2.split('.')[1].length
      } catch (e) {
      }
      return ((Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) /
        Math.pow(10, m)
      )
    },
    /**
     ** 除法函数，用来得到精确的除法结果
     ** 说明：javascript 的除法结果会有误差，在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。
     ** 调用：div(arg1,arg2)
     ** 返回值：arg1 除以 arg2 的精确结果
     **/
    div(arg1, arg2) {
      let t1 = 0,
        t2 = 0
      try {
        t1 = arg1.toString().split('.')[1].length
      } catch (e) {
      }
      try {
        t2 = arg2.toString().split('.')[1].length
      } catch (e) {
      }
      const r1 = Number(arg1.toString().replace('.', ''))
      const r2 = Number(arg2.toString().replace('.', ''))
      return (r1 / r2) * Math.pow(10, t2 - t1)
    },
    handleClicks(tab, event) {
      if (tab.index == 1) {
        this.serch = 1
      } else if (tab.index == 2) {
        this.serch = 2
      } else if (tab.index == 0) {
        this.serch = 0
      } else if (tab.index == 3) {
        this.serch = 3
      }

    },
    blures() {


      //养老个人金额

      this.addform.grYlMoney = this.mul(this.addform.grYlBase, this.addform.grYlProportion).toFixed(2)
      //养老企业金额

      this.addform.companyYlMoney = this.mul(this.addform.companyYlBase, this.addform.companyYlProportion).toFixed(2)
      //养老小计

      this.addform.ylInsuranceMoney = this.sum(this.addform.grYlMoney, this.addform.companyYlMoney).toFixed(2)

      //工商个人金额
      this.addform.grGsMoney = this.mul(this.addform.grGsBase, this.addform.grGsProportion).toFixed(2)
      //工商企业金额
      this.addform.companyGsMoney = this.mul(this.addform.companyGsBase, this.addform.companyGsProportion).toFixed(2)
      //工商小计

      this.addform.gsInsuranceMoney = this.sum(this.addform.grGsMoney, this.addform.companyGsMoney).toFixed(2)

      //失业个人金额

      this.addform.grSyMoney = this.mul(this.addform.grSyBase, this.addform.grSyProportion).toFixed(2)
      //失业企业金额

      this.addform.companySyMoney = this.mul(this.addform.companySyBase, this.addform.companySyProportion).toFixed(2)

      //失业小计

      this.addform.syInsuranceMoney = this.sum(this.addform.grSyMoney, this.addform.companySyMoney).toFixed(2)

      //生育个人金额

      this.addform.grBirthMoney = this.mul(this.addform.grBirthBase, this.addform.grBirthProportion).toFixed(2)
      //生育企业金额

      this.addform.companyBirthMoney = this.mul(this.addform.companyBirthBase, this.addform.companyBirthProportion).toFixed(2)
      //生育小计

      this.addform.birthInsuranceMoney = this.sum(this.addform.grBirthMoney, this.addform.companyBirthMoney).toFixed(2)

      //医疗个人金额

      this.addform.grCareMoney = this.mul(this.addform.grCareBase, this.addform.grCareProportion).toFixed(2)
      //医疗企业金额

      this.addform.companyCareMoney = this.mul(this.addform.companyCareBase, this.addform.companyCareProportion).toFixed(2)
      //医疗小计
      /*this.form.careInsuranceMoney = (Number(this.form.grCareMoney + this.form.companyCareMoney).toFixed(2))*/
      this.addform.careInsuranceMoney = this.sum(this.addform.grCareMoney, this.addform.companyCareMoney).toFixed(2)

      //社保个人缴纳
      /*this.form.grInsuranceMoney = (Number(this.form.grYlMoney + this.form.grGsMoney + this.form.grSyMoney + this.form.grBirthMoney + this.form.grCareMoney).toFixed(2))*/
      this.addform.grInsuranceMoney = this.sum(this.sum(this.sum(this.addform.grYlMoney, this.addform.grGsMoney), this.sum(this.addform.grSyMoney, this.addform.grBirthMoney)), this.addform.grCareMoney).toFixed(2)

      //社保公司缴纳
      /*this.form.companyInsuranceMoney = (Number(this.form.companyYlMoney + this.form.companyGsMoney + this.form.companySyMoney + this.form.companyBirthMoney + this.form.companyCareMoney).toFixed(2))*/
      this.addform.companyInsuranceMoney = this.sum(this.sum(this.sum(this.addform.companyYlMoney, this.addform.companyGsMoney), this.sum(this.addform.companySyMoney, this.addform.companyBirthMoney)), this.addform.companyCareMoney).toFixed(2)

      //社保合计
      /*this.form.insuranceMoney = (Number(this.form.grInsuranceMoney + this.form.companyInsuranceMoney).toFixed(2))*/
      this.addform.insuranceMoney = this.sum(this.addform.grInsuranceMoney, this.addform.companyInsuranceMoney).toFixed(2)

      //公积金个人金额
      /*this.form.grFundMoney = (Number(this.form.grFundBase * this.form.grFundProportion).toFixed(2))*/
      this.addform.grFundMoney = this.mul(this.addform.grFundBase, this.addform.grFundProportion).toFixed(2)

      //公积金公司金额
      /*this.form.companyFundMoney = (Number(this.form.companyFundBase * this.form.companyFundProportion).toFixed(2))*/
      this.addform.companyFundMoney = this.mul(this.addform.companyFundBase, this.addform.companyFundProportion).toFixed(2)

      //公积金小计
      /*this.form.fundSubtotal = (Number(this.form.grFundMoney + this.form.companyFundMoney).toFixed(2))*/
      this.addform.fundSubtotal = this.sum(this.addform.grFundMoney, this.addform.companyFundMoney).toFixed(2)

      //公积金个人缴纳
      this.addform.grFundPayment = this.addform.grFundMoney

      //公积金公司缴纳
      this.addform.companyFundPayment = this.addform.companyFundMoney

      //公积金合计
      /*this.form.fundTotal = (Number(this.form.grFundPayment + this.form.companyFundPayment).toFixed(2))*/
      this.addform.fundTotal = this.sum(this.addform.grFundPayment, this.addform.companyFundPayment).toFixed(2)

    },
    /** 提交按钮 */
    submitForms() {
      this.$refs["form"].validate(valid => {
        if (valid) {


          addScheme(this.addform).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.isjn = false;
            this.addopen = false;
            this.getList();
          });
        }

      });
    },
  }

};
</script>
